﻿/*validatebox 表单验证*/
/*validatebox 表单验证 扩展*/
$.extend($.fn.validatebox.defaults.rules, {
    equalTo:
        {
            validator: function (value, param) {
                return $(param[0]).val() == value;
            },
            message: '字段不匹配'
        },
    CHS: {
        validator: function (value) {
            return /^[\u0391-\uFFE5]+$/.test(value);
        },
        message: '请输入汉字'
    },
    ZIP: {
        validator: function (value) {
            return /^[1-9]\d{5}$/.test(value);
        },
        message: '邮政编码不存在'
    },
    QQ: {
        validator: function (value) {
            return /^[1-9]\d{4,20}$/.test(value);
        },
        message: 'QQ号码不正确'
    },
    mobile: {
        validator: function (value) {
            return /^((\+86)|(86))?((1[0-9]{10}))$/.test(value);
        },
        message: '手机号码不正确'
    },
    loginName: {
        validator: function (value) {
            return /^[\u0391-\uFFE5\w]+$/.test(value);
        },
        message: '登录名称只允许汉字、英文字母、数字及下划线。'
    },
    safepass: {
        validator: function (value) {
            return safePassword(value);
        },
        message: '密码由字母和数字组成，至少6位'
    },

    number: {
        validator: function (value) {
            return /^\d+$/.test(value);
        },
        message: '请输入数字'
    },
    idcard: {
        validator: function (value) {
            return idCard(value);
        },
        message: '请输入正确的身份证号码'
    },

    phone: {// 验证电话号码 
        validator: function (value) {
            return /^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/i.test(value);
        },
        message: '格式不正确,请使用下面格式:020-88888888'
    },
    intOrFloat: {// 验证整数或小数 
        validator: function (value) {
            return /^\d+(\.\d+)?$/i.test(value);
        },
        message: '请输入数字，并确保格式正确'
    },
    currency: {// 验证货币 
        validator: function (value) {
            return /^\d+(\.\d+)?$/i.test(value);
        },
        message: '货币格式不正确'
    },
    integer: {// 验证整数 
        validator: function (value) {
            return /^[+]?[1-9]+\d*$/i.test(value);
        },
        message: '请输入整数'
    },
    age: {// 验证年龄
        validator: function (value) {
            return /^(?:[1-9][0-9]?|1[01][0-9]|150)$/i.test(value);
        },
        message: '年龄必须是0到150之间的整数'
    },

    chinese: {// 验证中文 
        validator: function (value) {
            return /^[\Α-\￥]+$/i.test(value);
        },
        message: '请输入中文'
    },
    english: {// 验证英语 
        validator: function (value) {
            return /^[A-Za-z]+$/i.test(value);
        },
        message: '请输入英文'
    },
    unnormal: {// 验证是否包含空格和非法字符 
        validator: function (value) {
            return /.+/i.test(value);
        },
        message: '输入值不能为空和包含其他非法字符'
    },
    username: {// 验证用户名 
        validator: function (value) {
            return /^[a-zA-Z][a-zA-Z0-9_]{5,15}$/i.test(value);
        },
        message: '用户名不合法（字母开头，允许6-16字节，允许字母数字下划线）'
    },
    faxno: {// 验证传真 
        validator: function (value) {
            //            return /^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/i.test(value); 
            return /^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/i.test(value);
        },
        message: '传真号码不正确'
    },
    zip: {// 验证邮政编码 
        validator: function (value) {
            return /^[1-9]\d{5}$/i.test(value);
        },
        message: '邮政编码格式不正确'
    },
    ip: {// 验证IP地址 
        validator: function (value) {
            return /^((0[0-9]|1[0-9]\d{1,2})|(2[0-5][0-5])|(2[0-4][0-9])|(\d{1,2}))\.((0[0-9]|1[0-9]\d{1,2})|(2[0-5][0-5])|(2[0-4][0-9])|(\d{1,2}))\.((0[0-9]|1[0-9]\d{1,2})|(2[0-4][0-9])|(2[0-5][0-5])|(\d{1,2}))\.((0[0-9]|1[0-9]\d{1,2})|(2[0-4][0-9])|(2[0-5][0-5])|(\d{1,2}))$/i.test(value);
        },
        message: 'IP地址格式不正确'
    },
    name: {// 验证姓名，可以是中文或英文 
        validator: function (value) {
            return /^[\Α-\￥]+$/i.test(value) | /^\w+[\w\s]+\w+$/i.test(value);
        },
        message: '请输入姓名'
    },
    date: {// 验证姓名，可以是中文或英文 
        validator: function (value) {
            //格式yyyy-MM-dd或yyyy-M-d
            return /^(?:(?!0000)[0-9]{4}([-]?)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-]?)0?2\2(?:29))$/i.test(value);
        },
        message: '请输入合适的日期格式'
    },
    datetime: {// 验证姓名，可以是中文或英文 
        validator: function (value) {
            //格式yyyy-MM-dd或yyyy-M-d
            return /^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-)) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$/i.test(value);
        },
        message: '请输入合适的日期格式'
    },
    msn: {
        validator: function (value) {
            return /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(value);
        },
        message: '请输入有效的msn账号(例：abc@hotnail(msn/live).com)'
    },
    same: {
        validator: function (value, param) {
            if ($("#" + param[0]).val() != "" && value != "") {
                return $("#" + param[0]).val() == value;
            } else {
                return true;
            }
        }
    }
});
/* 密码由字母和数字组成，至少5位 */
var safePassword = function (value) {
    return !(/^(([A-Z]*|[a-z]*|\d*|[-_\~!@#\$%\^&\*\.\(\)\[\]\{\}<>\?\\\/\'\"]*)|.{0,5})$|\s/.test(value));
};
var idCard = function (value) {
    if (value.length == 18 && 18 != value.length) return false;
    var number = value.toLowerCase();
    var d, sum = 0, v = '10x98765432', w = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2], a = '11,12,13,14,15,21,22,23,31,32,33,34,35,36,37,41,42,43,44,45,46,50,51,52,53,54,61,62,63,64,65,71,81,82,91';
    var re = number.match(/^(\d{2})\d{4}(((\d{2})(\d{2})(\d{2})(\d{3}))|((\d{4})(\d{2})(\d{2})(\d{3}[x\d])))$/);
    if (re == null || a.indexOf(re[1]) < 0) return false;
    if (re[2].length == 9) {
        number = number.substr(0, 6) + '19' + number.substr(6);
        d = ['19' + re[4], re[5], re[6]].join('-');
    } else d = [re[9], re[10], re[11]].join('-');
    if (!isDateTime.call(d, 'yyyy-MM-dd')) return false;
    for (var i = 0; i < 17; i++) sum += number.charAt(i) * w[i];
    return (re[2].length == 9 || number.charAt(17) == v.charAt(sum % 11));
};
var isDateTime = function (format, reObj) {
    format = format || 'yyyy-MM-dd';
    var input = this, o = {}, d = new Date();
    var f1 = format.split(/[^a-z]+/gi), f2 = input.split(/\D+/g), f3 = format.split(/[a-z]+/gi), f4 = input.split(/\d+/g);
    var len = f1.length, len1 = f3.length;
    if (len != f2.length || len1 != f4.length) return false;
    for (var j = 0; j < len1; j++) if (f3[j] != f4[j]) return false;
    for (var i = 0; i < len; i++) o[f1[i]] = f2[i];
    o.yyyy = s(o.yyyy, o.yy, d.getFullYear(), 9999, 4);
    o.MM = s(o.MM, o.M, d.getMonth() + 1, 12);
    o.dd = s(o.dd, o.d, d.getDate(), 31);
    o.hh = s(o.hh, o.h, d.getHours(), 24);
    o.mm = s(o.mm, o.m, d.getMinutes());
    o.ss = s(o.ss, o.s, d.getSeconds());
    o.ms = s(o.ms, o.ms, d.getMilliseconds(), 999, 3);
    if (o.yyyy + o.MM + o.dd + o.hh + o.mm + o.ss + o.ms < 0) return false;
    if (o.yyyy < 100) o.yyyy += (o.yyyy > 30 ? 1900 : 2000);
    d = new Date(o.yyyy, o.MM - 1, o.dd, o.hh, o.mm, o.ss, o.ms);
    var reVal = d.getFullYear() == o.yyyy && d.getMonth() + 1 == o.MM && d.getDate() == o.dd && d.getHours() == o.hh && d.getMinutes() == o.mm && d.getSeconds() == o.ss && d.getMilliseconds() == o.ms;
    return reVal && reObj ? d : reVal;

    function s(s1, s2, s3, s4, s5) {
        s4 = s4 || 60, s5 = s5 || 2;
        var reVal2 = s3;
        if (s1 != undefined && s1 != '' || !isNaN(s1)) reVal2 = s1 * 1;
        if (s2 != undefined && s2 != '' && !isNaN(s2)) reVal2 = s2 * 1;
        return (reVal2 == s1 && s1.length != s5 || reVal2 > s4) ? -10000 : reVal2;
    }
};
$.fn.serializeObject = function () {
    var o = {};
    var a = this.serializeArray();
    $.each(a, function () {
        if (o[this.name]) {
            if (!o[this.name].push) {
                o[this.name] = [o[this.name]];
            }
            o[this.name].push(this.value || '');
        } else {
            o[this.name] = this.value || '';
        }
    });
    return o;
};
/*Table 默认属性定义*/
var tableOptionDefault = {
    title: '列表',
    fit: true,
    nowrap: true,
    autoRowHeight: false,
    striped: true,
    collapsible: true,
    fitColumns: true,
    singleSelect: true,
    pagination: true,
    rownumbers: true,
    idField: 'id',

    toolbar: [{
        text: '添加',
        iconCls: 'icon-add'
    }, '-', {
        text: '修改',
        iconCls: 'icon-edit'
    }, '-', {
        text: '查找',
        iconCls: 'icon-search'
    }, '-', {
        text: '删除',
        iconCls: 'icon-remove'
    }]
};
$.extend($.fn.datagrid.defaults, tableOptionDefault);
/*控制面板默认属性*/
var PanelDefaultOption = {
    border: true,
    loadingMessage: "正在载入..."
};
$.extend($.fn.panel.defaults, PanelDefaultOption);
/*window 弹窗定义*/
var windowsDefaultOption = {
    loadingMessage: "正在载入..."
};
$.extend($.fn.window.defaults, windowsDefaultOption);
$.extend($.fn.dialog.defaults, {
    closed: true,
    closable: true,
    shadow: true,
    modal: true,
    collapsible: true
});
$.extend($.fn.tabs.defaults, {
    border: false,
    fit: false,
    plain: false
});
$.extend($.fn.combo.defaults, {
    panelHeight: 50,
    hasDownArrow: false
});
var languageData = [{ id: 'zh_cn', text: '简体中文' }, { id: 'en_us', text: '美国英语' }];

$.crud = function (op) {
    $.crud.default = {
        getlisturl: '',
        addurl: '',
        getdetailurl: '',
        editurl: '',
        deleteurl: '',
        bulkdeleteurl: '',
        table: "#table_list",
        add: "#add",
        edit: "#edit",
        search: "#search",
        addform: '#add_form',
        editform: '#edit_form',
        searchform: '#search_form',
        addupload: 'add_upload',
        editupload: 'edit_upload',
        btndelete: '.btn_delete',
        btnedit: '.btn_edit',
        btnadd: '.btn_add',
        isuploadadd: false,
        isuploadedit: false,
        isbulkdelete: true,
        tableoption: {},
        adddialogoption: {},
        seachdialogoption: {},
        editdialogoption: {},
        eidtformoption: {},
        addajaxoption: {},
        editajaxoption: {},
        deleteajaxoption: {},
        searchajaxoption: {},
        tablemenu: ['add', 'edit', 'delete', 'search'],
        tableloadsuccess: function () { }
    };
    $.crud.add = function (option) {
        $(option.add).dialog("open");
    };
    $.crud.edit = function (option) {
        var selectdata = $(option.table).datagrid('getSelected');
        if (selectdata == null) {
            $.messager.show({
                title: '提示',
                msg: '请选择要修改记录！',
                timeout: 5000,
                showType: 'fade'
            });
        } else {
            $(option.editform).form('load', option.getdetailurl + "?id=" + selectdata.id);

        }
    };
    $.crud.search = function (option) {
        $(option.search).dialog("open");
    };
    $.crud.adddialog = function (option, addoption) {
        addoption = $.extend({
            title: '添加',
            iconCls: 'icon-add',
            width: 600,
            buttons: [{
                text: '保存',
                iconCls: 'icon-ok',
                handler: function () {
                    if (option.isuploadadd)
                        $.crud.adduploadsave(option, option.addajaxoption);
                    else
                        $.crud.addsave(option, option.addajaxoption);
                }
            }, {
                text: '关闭',
                iconCls: 'icon-cancel',
                handler: function () {
                    $('#add').dialog('close');
                }
            }]
        }, addoption);
        $(option.add).dialog(addoption);
    };
    $.crud.editdialog = function (option, editoption) {
        editoption = $.extend({
            title: '修改',
            iconCls: 'icon-edit',
            width: 600,
            closed: true,
            buttons: [{
                text: '保存',
                iconCls: 'icon-ok',
                handler: function () {
                    if (option.isuploadedit)
                        $.crud.edituploadsave(option, option.editajaxoption);
                    else
                        $.crud.editsave(option, option.editajaxoption);
                }

            }, {
                text: '删除',
                iconCls: 'icon-remove',
                handler: function () {
                    $.crud.delete(option, option.deleteajaxoption);
                }
            }, {
                text: '关闭',
                iconCls: 'icon-cancel',
                handler: function () {
                    $(option.edit).dialog('close');
                }
            }]
        }, editoption);
        $(option.edit).dialog(editoption);
    };
    $.crud.searchdialog = function (option, searchoption) {
        searchoption = $.extend({
            title: '检索',
            iconCls: 'icon-search',
            width: 400,
            modal: false,
            buttons: [{
                text: '查找',
                iconCls: 'icon-ok',
                handler: function () {
                    $(option.table).datagrid("reload", $(option.searchform).serializeObject());
                }
            }, {
                text: '全部',
                iconCls: 'icon-search',
                handler: function () {
                    $(option.searchform).form("clear");
                    $(option.table).datagrid("reload", $(option.searchform).serializeObject());
                }
            }, {
                text: '关闭',
                iconCls: 'icon-cancel',
                handler: function () {
                    $(option.searchform).form("clear");
                    $(option.search).dialog('close');
                }
            }]
        }, searchoption);
        $(option.search).dialog(searchoption);
    };
    $.crud.table = function (option, tableoption) {
        tableoption = $.extend({
            checkOnSelect: !option.isbulkdelete,
            selectOnCheck: !option.isbulkdelete,

            toolbar: [{
                text: '添加',
                iconCls: 'icon-add',
                handler: function () {
                    $.crud.add(option, option.addajaxoption);
                }
            }, '-', {
                text: '修改',
                iconCls: 'icon-edit',
                handler: function () {
                    $.crud.edit(option, option.editajaxoption);

                }
            }, '-', {
                text: '查找',
                iconCls: 'icon-search',
                handler: function () {
                    $.crud.search(option, option.searchjaxoption);

                }
            }, '-', {
                text: '刷新',
                iconCls: 'icon-reload',
                handler: function () {
                    $(option.table).datagrid("reload", $(option.searchform).serializeObject());
                }
            }, '-', {
                text: '删除',
                iconCls: 'icon-remove',
                handler: function () {
                    $.crud.bulkdelete(option, option.deleteajaxoption);
                }
            }],
            onDblClickRow: function (rowIndex, rowData) {
                $.crud.edit(option, option.editajaxoption);
            },
            onClickRow: function (rowIndex, rowData) {


            },
            onClickCell: function (rowIndex, field) {
                if (field == "opdelete") {
                    $.crud.delete(option, option.deleteajaxoption);
                }

            }

        }, tableoption);
        $(option.table).datagrid(tableoption);
    };
    $.crud.addsave = function (option, ajaxoption) {
        ajaxoption = $.extend({
            type: "POST",
            url: "Handle/Command/Add.aspx",
            data: $(option.addform).serialize(),
            success: function (msg) {
                $.messager.show({
                    title: '提示',
                    msg: msg.message,
                    timeout: 5000,
                    showType: 'fade'
                });
                if (msg.state) {
                    $(option.addform)[0].reset();
                    $(option.table).datagrid("unselectAll");
                    $(option.table).datagrid("reload", $(option.searchform).serializeObject());

                }
            },
            error: function () {
                $.messager.show({
                    title: '提示',
                    msg: '保存失败！',
                    timeout: 5000,
                    showType: 'fade'
                });
            }
        }, ajaxoption);
        $.ajax(ajaxoption);
    };
    $.crud.editsave = function (option, ajaxoption) {
        ajaxoption = $.extend({
            type: "POST",
            url: "Handle/Command/Edit.aspx",
            data: $(option.editform).serialize(),
            success: function (msg) {
                $.messager.show({
                    title: '提示',
                    msg: msg.message,
                    timeout: 5000,
                    showType: 'fade'
                });
                if (msg.state) {
                    $(option.table).datagrid("reload", $(option.searchform).serializeObject());
                }
            },
            error: function () {
                $.messager.show({
                    title: '提示',
                    msg: '保存失败！',
                    timeout: 5000,
                    showType: 'fade'
                });
            }
        }, ajaxoption);
        $.ajax(ajaxoption);
    };
    $.crud.delete = function (option, deleteoption, id) {
        if (!id || id == null || id == undefined) {
            var selectdata = $(option.table).datagrid('getSelected');
            if (selectdata == null) {
                $.messager.show({
                    title: '提示',
                    msg: '请选择要删除记录！',
                    timeout: 5000,
                    showType: 'fade'
                });
            } else {
                id = selectdata.id;
            }
        }
        $.messager.confirm("提示", "确认删除?", function (b) {
            if (b) {
                deleteoption = $.extend({
                    type: "POST",
                    url: "Handle/Command/Delete.aspx",
                    data: { id: id },
                    success: function (msg) {
                        $.messager.show({
                            title: '提示',
                            msg: msg.message,
                            timeout: 5000,
                            showType: 'fade'
                        });
                        if (msg.state) {
                            $(option.table).datagrid("reload", $(option.searchform).serializeObject());
                            $(option.edit).dialog('close');
                            $(option.add).dialog('close');
                        }
                    },
                    error: function () {
                        $.messager.show({
                            title: '提示',
                            msg: '删除失败！',
                            timeout: 5000,
                            showType: 'fade'
                        });
                    }
                }, deleteoption);
                $.ajax(deleteoption);
            }
        });
    };
    $.crud.bulkdelete = function (option, ajaxoption) {
        if (!option || option == undefined || !option.table || option.table == undefined) {
            $.messager.alert('提示', '请选择要删除的数据');
            return;
        }
        var rows = $(option.table).datagrid('getChecked');
        if (!rows || rows.length == 0) {
            $.messager.alert('提示', '请选择要删除的数据');
            return;
        }
        var parm;
        $.each(rows, function (i, n) {
            if (i == 0) {
                parm = "id=" + n.id;
            } else {
                parm += "&id=" + n.id;
            }
        });
        ajaxoption = $.extend({
            type: "POST",
            url: option.bulkdeleteurl,
            data: parm,
            success: function (msg) {
                $.messager.show({
                    title: '提示',
                    msg: msg.message,
                    timeout: 5000,
                    showType: 'fade'
                });
                if (msg.state) {
                    $(option.table).datagrid("reload", $(option.searchform).serializeObject());
                    $(option.edit).dialog('close');
                    $(option.add).dialog('close');

                }
            },
            error: function () {
                $.messager.show({
                    title: '提示',
                    msg: '删除失败！',
                    timeout: 5000,
                    showType: 'fade'
                });
            }
        }, ajaxoption);
        $.messager.confirm('提示', '是否删除这些数据?', function (r) {
            if (!r) {
                return;
            }
            $.ajax(ajaxoption);
        });
    };
    $.crud.btnedit = function (option) {
        $(option.btnedit).click(function () {
            $.crud.edit(option);

        });
    };
    $.crud.btndelete = function (option) {
        $(option.btndelete).click(function () {
            $.crud.delete(option, option.bulkdeleteajaxoption);
        });
    };
    $.crud.eidtform = function (option, eidtformoption) {
        eidtformoption = $.extend({
            onBeforeLoad: function () {
                $(option.edit).dialog("close");
            },
            onLoadSuccess: function () {
                $(option.edit).dialog("open");
            },
            onLoadError: function () {
            }
        }, eidtformoption);
        $(option.editform).form(eidtformoption);
    };
    $.crud.adduploadsave = function (option, ajaxoption) {
        ajaxoption = $.extend({
            type: "POST",
            fileElementId: option.addupload,
            dataType: 'json',
            url: "Handle/Command/Add.aspx",
            data: $(option.addform).serializeObject(),
            success: function (msg) {
                $.messager.show({
                    title: '提示',
                    msg: msg.message,
                    timeout: 5000,
                    showType: 'fade'
                });
                if (msg.state) {
                    $(option.addform)[0].reset();
                    $(option.table).datagrid("reload", $(option.searchform).serializeObject());
                }
            },
            error: function () {
                $.messager.show({
                    title: '提示',
                    msg: '保存失败！',
                    timeout: 5000,
                    showType: 'fade'
                });
            }
        }, ajaxoption);
        $.ajaxFileUpload(ajaxoption);
    };
    $.crud.edituploadsave = function (option, ajaxoption) {
        ajaxoption = $.extend({
            type: "POST",
            fileElementId: option.editupload,
            dataType: 'json',
            url: "Handle/Command/Edit.aspx",
            data: $(option.editform).serializeObject(),
            success: function (msg) {
                $.messager.show({
                    title: '提示',
                    msg: msg.message,
                    timeout: 5000,
                    showType: 'fade'
                });
                if (msg.state) {
                    $(option.table).datagrid("reload", $(option.searchform).serializeObject());
                }
            },
            error: function () {
                $.messager.show({
                    title: '提示',
                    msg: '保存失败！',
                    timeout: 5000,
                    showType: 'fade'
                });
            }
        }, ajaxoption);
        $.ajaxFileUpload(ajaxoption);
    };
    $.crud.addelement = function (id, rowData) {
        return '<a class="fancybox_image" name="fancybox_image" href="../upload/workshop/' + rowData.CoNormalImage + '"></a>';
    };
    $.crud.editelement = function (id, rowData) {
        return '<a href="javascript:void(0);" class="btn_edit" name="btn_edit"  value="' + rowData.id + '">修改</a> ';
    };
    $.crud.deleteelement = function (id, rowData) {
        return '<a href="javascript:void(0);" class="btn_delete"  name="btn_delete"  value="' + rowData.id + '">删除</a> ';
    };
    $.crud.table.imageelement = function (id, rowData, path) {
        return '<a class="fancybox_image" href="' + path + rowData.CoNormalImage + '"></a>';
    };
    $.crud.init = function (option) {
        $.crud.table(option, option.tableoption);
        $.crud.adddialog(option, option.adddialogoption);
        $.crud.editdialog(option, option.editdialogoption);
        $.crud.searchdialog(option, option.searchajaxoption);
        $.crud.eidtform(option, option.eidtformoption);

    };
    op = $.extend($.crud.default, op);
    $.crud.init(op);
};
$(document).ready(function () {

});